package _2025_3_12;

class d3 extends Thread{
    private int index;
    d3(int index){
        this.index=index;
    }
    @Override
    public void run() {
        System.out.println("Thread "+index+" is ruuning");
    }
}
public class demo3 {
    public static void main(String[] args) throws InterruptedException {
        Thread[]threads=new Thread[20];
        for (int i = 0; i <20 ; i++) {
            threads[i]=new Thread(new d3(i));
            threads[i].start();
        }
        for (int i = 0; i <20 ; i++) {
            threads[i].join();
        }
        System.out.println("ok");
    }

}
